package cn.com.ghy.android.widget.coopvisit;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabWidget;
import android.widget.TabHost.TabSpec;
import cn.com.ghy.android.widget.R;

/**
 * @软件著作权:金红叶纸业集团有限公司
 * @系统名称:SFA系统
 * @Description:今天协访主菜单
 * @author wuz  @date 2011-6-16 13:31:58
 * @版本历史:v1.0
 * @Copyright:Copyright (c) 2011-2012 
 */

public class CoopVisit extends TabActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.coop_visit);
		TabHost tabHost = getTabHost();
		TabSpec tab1 = tabHost.newTabSpec("tab1");
		tab1.setIndicator("经销商");
		tab1.setContent(new Intent(this, CoopVisitDealerList.class));
		tabHost.addTab(tab1);

		TabSpec tab2 = tabHost.newTabSpec("tab2");
		tab2.setIndicator("大店");
		tab2.setContent(new Intent(this, CoopVisitBigShopList.class));
		tabHost.addTab(tab2);

		TabSpec tab3 = tabHost.newTabSpec("tab3");
		tab3.setIndicator("小店");
		tab3.setContent(new Intent(this, CoopVisitSmallShopList.class));
		tabHost.addTab(tab3);

		tabHost.setCurrentTab(0);

		TabWidget tabWidget = tabHost.getTabWidget();
		for (int i = 0; i < tabWidget.getChildCount(); i++) {
			tabWidget.getChildAt(i).getLayoutParams().height = getWindowManager()
					.getDefaultDisplay().getHeight() / 12;
		}
	}
}
